.class public Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private context:Landroid/content/Context;

.field final synthetic this$0:Lorg/apache/cordova/WqCordovaActivity;


# direct methods
.method public constructor <init>(Lorg/apache/cordova/WqCordovaActivity;Landroid/content/Context;)V
    .locals 0

    iput-object p1, p0, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p2, p0, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;->context:Landroid/content/Context;

    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->menuHashList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->menuHashList:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 4

    if-nez p2, :cond_1

    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;->context:Landroid/content/Context;

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f03007c

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    new-instance v1, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter$ViewHolder;

    invoke-direct {v1, p0}, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter$ViewHolder;-><init>(Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;)V

    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    const v0, 0x7f0c0313

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter$ViewHolder;->groupItem:Landroid/widget/TextView;

    const v0, 0x7f0c0312

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, v1, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter$ViewHolder;->cm_popupItem_ll:Landroid/widget/LinearLayout;

    move-object v2, v1

    :goto_0
    iget-object v0, p0, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter;->this$0:Lorg/apache/cordova/WqCordovaActivity;

    iget-object v0, v0, Lorg/apache/cordova/WqCordovaActivity;->menuHashList:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/HashMap;

    iget-object v3, v2, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter$ViewHolder;->groupItem:Landroid/widget/TextView;

    const-string/jumbo v1, "menuName"

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    const-string/jumbo v1, "menuName"

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    :goto_1
    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const-string/jumbo v1, "menuColor"

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    const-string/jumbo v1, "menuColor"

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    :try_start_0
    iget-object v1, v2, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter$ViewHolder;->groupItem:Landroid/widget/TextView;

    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setTextColor(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_2
    return-object p2

    :cond_1
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/apache/cordova/WqCordovaActivity$MenuPopupAdapter$ViewHolder;

    move-object v2, v0

    goto :goto_0

    :cond_2
    const-string/jumbo v1, ""

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_2
.end method
